using System;
using System.Data;
using System.Collections;

namespace APP.QUANLY.Entity
{
     /// <summary>
     /// Summary description for CHUCNANG.
     /// </summary>
     public class CHUCNANG
    {
              private Int32 _MACHUCNANG;
      private string _TENCHUCNANG;
      private NGUOIDUNG_QUYENHANList _listNGUOIDUNG_QUYENHAN;
        private bool isExisting;
        #region Properties
        public bool IsExisting
        {
              get{return isExisting;}
              set{isExisting = value;}
        }
		      public bool IsMACHUCNANGNullable
      { get { return false;  } }
      public Int32 MACHUCNANG
      {
         get { return _MACHUCNANG; }
         set { _MACHUCNANG = value; }
      }
      public bool IsTENCHUCNANGNullable
      { get { return true;  } }
      public string TENCHUCNANG
      {
         get { return _TENCHUCNANG;  }
         set { _TENCHUCNANG = value; }
      }
public NGUOIDUNG_QUYENHANList NGUOIDUNG_QUYENHANList 
{ 
	get { return _listNGUOIDUNG_QUYENHAN; }
	set { _listNGUOIDUNG_QUYENHAN = value;}
}

        #endregion

        #region Constructors
        public CHUCNANG()
        {
            Reset();
        }
        public CHUCNANG(CHUCNANG obj)
        {
            	this._MACHUCNANG = obj.MACHUCNANG;
	this._TENCHUCNANG = obj.TENCHUCNANG;
        }
        #endregion

        public void Reset()
        {
                     _MACHUCNANG = EmptyValues.v_Int32;
         _TENCHUCNANG = EmptyValues.v_string;
	_listNGUOIDUNG_QUYENHAN = null;
        }

         
        #region Hidden

        /*
        private void readProperties(IDataReader reader)
        {
            try
            {
                                if(!(reader["MACHUCNANG"] is DBNull))
		{
			obj.MACHUCNANG = (Int32)reader["MACHUCNANG"];
		}
                if(!(reader["TENCHUCNANG"] is DBNull))
		{
			obj.TENCHUCNANG = (string)reader["TENCHUCNANG"];
		}
//            _MACHUCNANG = (reader["MACHUCNANG"] is DBNull)?DalTools.EmptyValues.v_Int32:(Int32)reader["MACHUCNANG"];
//            _TENCHUCNANG = (reader["TENCHUCNANG"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["TENCHUCNANG"];
            }
            catch (Exception ex)
            {
                throw new DalException("Failed to read properties from DataReader.", ex);
            }
        } 
        */

        #endregion


        public void Fill(Int32 MACHUCNANG, string TENCHUCNANG)
        {
                     this._MACHUCNANG = MACHUCNANG;
         this._TENCHUCNANG = TENCHUCNANG;
        }
    }
}